import os
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent

# Appium服务器配置
APPIUM_SERVER = {
    'host': '127.0.0.1',
    'port': 4723
}

# 应用配置
APP_CONFIG = {
    'platformName': 'Android',
    # 'platformVersion': '14.0',
    'deviceName': '3420559136003BP',
    # 'app': os.path.join(BASE_DIR, 'app', 'your_app.apk'),
    "appPackage": "com.topboya.linker",
    "appActivity": "com.topboya.linker.functional.new_edition.MainActivityNew2",
    'automationName': 'UiAutomator2',
    'noReset': True,
    'fullReset': False,
    'newCommandTimeout': 300
}

# 元素等待时间
WAIT_TIME = 10

# 日志配置
LOG_CONFIG = {
    'level': 'INFO',
    'format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    'file': os.path.join(BASE_DIR, 'logs', 'appium_test.log')
}